package com.example.music.utils;

public class FileHandle {



    public String getTitle(String fileName){
        String title=fileName.substring(fileName.indexOf("-")+1,fileName.lastIndexOf("."));
        return title;
    }

    public String getSingger(String fileName){
        String singer=fileName.substring(0,fileName.indexOf("-"));
        return singer;
    }
/*
    String fileName = file.getOriginalFilename();
        System.out.println("文件名 "+fileName);

    String singer=fileName.substring(0,fileName.indexOf("-"));
        System.out.println("歌手 "+singer);
    String title=fileName.substring(fileName.indexOf("-")+1,fileName.lastIndexOf("."));

        System.out.println("歌曲名 "+title);

 */
}
